<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let xz
        while(xz != "q"){
            xz = prompt("请选择+-*/ 按q退出")
        if(xz=="+"){
            let a = +prompt("第一个数")
            let b = +prompt("第二个数")
            alert(a+b)
        } else if(xz=="-"){
            let a = +prompt("第一个数")
            let b = +prompt("第二个数")
            alert(a-b)
        } else if(xz=="*"){
            let a = +prompt("第一个数")
            let b = +prompt("第二个数")
            alert(a*b)
        } else if(xz=="/"){
            let a = +prompt("第一个数")
            let b = +prompt("第二个数")
            alert(a/b)
        } 
    }  
    </script>
</body>
</html>